<template>
  <div class="app">
    <router-view></router-view
    ><!--路由必须写 -->
    <van-tabbar route active-color="red" v-show="$route.meta.showTabbar">
      <van-tabbar-item :to="{ name: 'Home' }" icon="home-o"
        >首页</van-tabbar-item
      >
      <van-tabbar-item :to="{ name: 'Fenlei' }" icon="search"
        >搜索</van-tabbar-item
      >
      <van-tabbar-item :to="{ name: 'Gouwuche' }" icon="friends-o"
        >购物车</van-tabbar-item
      >
      <van-tabbar-item :to="{ name: 'Wode' }" icon="setting-o"
        >我的</van-tabbar-item
      >
    </van-tabbar>
  </div>
</template>

<script>
import { getToken } from "@/utils/auth";
export default {
  components: {},
  data() {
    return {
      active: 0,
    };
  },
  computed: {},
  watch: {},

  methods: {},
  created() {
    var token = getToken();
    this.$store.commit("get_token", token);
  },
  mounted() {},
};
</script>
<style scoped></style>
